import api from "./api";

import axios from "../../../axios";

export const bannerQuery = (params) => {
  return axios({
    method: "get",
    url: api.home.banner,
    params,
  });
};
export const list = () => {
  return axios({
    method: "get",
    url: api.post.list,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });
};
//详情页
export const detail = (id) => {
  return axios({
    method: "get",
    url: `${api.post.detail}+${id}`,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });
};
export const policylist = (params) => {
  return axios({
    method: "get",
    url: api.post.policylist,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
    params,
  });
};
// 获取政策详情
export const policydetail = (id) => {
  return axios({
    method: "get",
    url: `${api.post.policydetail}+${id}`,
    // params,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });
};
// 所有的驿站列表
export const youthlist = (params) => {
  return axios({
    method: "get",
    url: api.post.youthlist,
    params,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });
};
// 获取某个驿站的具体信息
export const youtndetail = (id) => {
  return axios({
    method: "get",
    url: `${api.post.youtndetail}+${id}`,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });
};
